//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { UserGroup, UserGroupResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooUserGroupList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<UserGroupResponse>(`/uctoo/user_group/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooUserGroup = async (id: string) => {
  return requestClient.get<UserGroup>(`/uctoo/user_group/${id}`);
};

export const adductooUserGroup = async (data: Partial<UserGroup>) => {
  return requestClient.post<UserGroup>('/uctoo/user_group/add', data);
};

export const edituctooUserGroup = async (data: Partial<UserGroup>) => {
  return requestClient.post<UserGroup>('/uctoo/user_group/edit', data);
};

export const deleteuctooUserGroup = async (id: string) => {
  return requestClient.post<any>('/uctoo/user_group/del', { id });
};
